<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/commons/taglibs.jsp"%>
<%@ taglib prefix="sys" tagdir="/WEB-INF/tags" %>

<html>
<head>
   <title>分配权限页面</title>
  <jsp:include page="../../../commons/common-add.jsp"></jsp:include>
  <script type="text/javascript" src="${basePath}/statics/modules/sys/user/js/user_authority.js"></script>
</head>
<body>
  <sys:message msgContent="${message}"/>
    <div class="col-md-6">
        <form id="inputForm" action="user_role_save" method="post"  class="form-horizontal">
          <input type="hidden" id="id" name="id" value="${ empty user.id ? 0 :user.id}"/>
            <div class="top-form-element-margin">

            <div class="row form-group line-height-34">
                <label for="username" class="col-sm-3 control-label text-pull-right"  >用户名:</label>
                <div class="col-sm-4">
                    <input type="text" autofocus class="required form-control" id="username" name="username" readonly="readonly"   value="${user.username}">
                </div>
            </div>

            <div class="row form-group line-height-34">
                <label for="roleIds" class="col-sm-3 control-label text-pull-right" >角色:</label>
                <div class="col-sm-4">
                    <sys:treeselect id="roleIds" name="roleIds" value="${selRoleIds}"
                                    labelName="${selPermNames}" labelValue="${selRoleNames}"
                                    title="角色列表"
                                    url="/admin/sys/role/ajax_roles_tree" cssClass="form-control" checked="true" />
                </div>
            </div>

            <div class="form-group" style="text-align: center;">
              <shiro:hasPermission name="sys:user:userrolesave">
                <input id="btnSubmit" class="btn btn-primary"  type="submit"
                       value="保存" />&nbsp;
              </shiro:hasPermission>
              <input id="btnCancel" class="btn btn-cancle" style="margin-left: 50px" type="reset" value="重置" />
            </div>
            </div>
        </form>
      </div>
</body>
</html>
